import Images from '@ASSET/Images'
import i18n from '@I18N'
import { StringMapITF } from '@INTERFACES/Common'

export const GENDER_TYPE_ENUM = {
  Male: 'Male',
  Female: 'Female'
}

export const PATIENT_NUM_MAX = 5

export const UNIT_TYPE = {
  CM: 'cm',
  KG: 'kg'
}

export const PATIENT_REGISTRATION_STATUS = {
  Terminated: 'Terminated',
  Active: 'Active',
  Pending: 'Pending',
  Rejected: 'Rejected',
  Processing: 'Processing'
}

export const PATIENT_REGISTRATION_STATUS_TEXT = {
  Active: i18n.patient.registration_registed(),
  Pending: i18n.patient.registration_pending(),
  Processing: i18n.patient.registration_pending(),
}

export const PATIENT_INFO = {
  Allergies: {
    Name: 'Allergies',
    Type: 'allergies'
  },
  SurgicalHistory: {
    Name: 'SurgicalHistory',
    Type: 'surgicalHistory',
  },
  PastHistory: {
    Name: 'PastHistory',
    Type: 'pastHistory',
  },
  FamilyHistory: {
    Name: 'FamilyHistory',
    Type: 'familyHistory',
  },
  CurrentHistory: {
    Name: 'CurrentHistory',
    Type: 'currentHistory',
  }
}

export const RELATIONSHIP_TYPE = {
  Self: {
    en: 'Superintendent',
    zh: '本人'
  },
  Parent: {
    en: 'Parent',
    zh: '父母'
  },
  Children: {
    en: 'Children',
    zh: '子女'
  },
  Other: {
    en: 'Other',
    zh: '其他'
  }
}

export const GENDER_AVATAR_MAP = {
  [GENDER_TYPE_ENUM.Male]: Images.patient.default_patient_male,
  [GENDER_TYPE_ENUM.Female]: Images.patient.default_patient_female,
}

export const FLOW_NODE_TYPE = {
  Question: 'Question',
  Choice: 'Choice',
  Leaf: 'Leaf',
  Loading: 'Loading',
}

export const RATE_DESC_MAP = [{
  zh: '毫无帮助',
  en: 'Not helpful'
}, {
  zh: '帮助较少',
  en: 'A little',
}, {
  zh: '一般',
  en: 'Fair'
}, {
  zh: '比较有帮助',
  en: 'Helpful',
}, {
  zh: '很有帮助',
  en: 'Very helpful'
}]

export const PATIENT_TYPES = [
  'Inpatient', 'Online', 'Outpatient', 'Surgery'
]
export enum CREATE_PATIENT_TYPE {
  CREATE_LOG_PATIENT= 'createLogPatient',
  CREATE_BASIC_PATIENT= 'createBasicPatient',
  SURVEY_PATIENT_REGISTER='createSurveyPatient',
}

export const NONE_LABEL = {
  TagId: 'None',
  TagName: { en: 'None', zh: '无' },
  TagType: 'Icd',
}

export const DEFAULT_BIRTH_DATE = '1980-01-01'
export const DEFAULT_AGE_INDEX = 39
export const DEFAULT_AGE_VALUES = new Array(120).fill(0).map((item, index) => `${index + 1} 岁`)

export enum RELATIONSHIP_ENUM {
  Self = 'Self',
  Parent = 'Parent',
  Children = 'Children',
  Other = 'Other',
}

export enum GENDER_ENUM {
  Male = 'Male',
  Female = 'Female',
}

export const MANAGEMENT_TYPE = {
  PainManagement30: 'PainManagement30'
}

export const FOLLOW_UP_PLAN_ITEMS_TYPE = {
  Survey: 'Survey',
  FeedItem: 'FeedItem',
  Course: 'Course'
}

export enum PATIENT_REGISTRATION_STATUS_ENUM {
  Active = 'Active',
  Pending = 'Pending',
  Processing = 'Processing',
}

export enum PATIENT_FILE_TYPE {
  MedRecord= 'MedRecord',
  ConsultationReport= 'ConsultationReport',
  ElectMedRecord = 'ElectMedRecord'
}
